<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <title new="<fmt:message code="main.newwork" />" todo="办理工作" ><fmt:message code="roleAuthorization.th.ViewDetails" /></title>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ? MYOA_CHARSET : htmlspecialchars($HTML_PAGE_CHARSET))?>" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/m_reset.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/new_work.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/bootstrap.css">
    <link rel="stylesheet" href="../../lib/layui/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/handle.css"/>
    <script src="/js/common/language.js"></script>
    <script src="../../js/workflow/work/ProjectControl.js"></script>
    <script type="text/javascript" src="/lib/jQuery-File-Upload-master/jquery-1.8.3.min.js"></script>
    <script src="../../lib/layer/layer.js?20201106"></script>
    <script src="../../lib/laydate/laydate.js"></script>
    <script src="../../js/jquery/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../lib/jquery.form.min.js"></script>
    <script type="text/javascript" src="../../lib/jquery.jqprint-0.3.js"></script>
    <script type="text/javascript" src="../../lib/jquery-migrate-1.1.0.js"></script>
    <script src="../../js/base/base.js"></script>
    <script src="../../js/mustache.min.js"></script>
    <script src="../../lib/layui/layui/layui.js"></script>
    <script src="/lib/ueditor/ueditor.config.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/ueditor.all.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/UEcontroller.js" type="text/javascript" charset="utf-8"></script>
    <%--无主办会签问题--%>
    <script src="../../js/base/workformbase.js"></script>
    <script src="../../js/workflow/work/workform.js?20201015.1"></script>
    <script src="../../lib/jquery.form.min.js"></script>

    <!-- 金格签章 -->

    <link rel="stylesheet" href="../../lib/kinggrid/dialog/artDialog/ui-dialog.css">
    <link rel="stylesheet" href="../../lib/kinggrid/core/kinggrid.plus.css">

    <script type="text/javascript" src="../../lib/kinggrid/core/kinggrid.min.js"></script>
    <script type="text/javascript" src="../../lib/kinggrid/core/kinggrid.plus.min.js"></script>
    <script type="text/javascript" src="../../lib/kinggrid/dialog/artDialog/dialog.js"></script>

    <!-- html签章核心JS -->
    <script type="text/javascript" src="../../lib/kinggrid/signature.min.js"></script>
    <!-- PC端附加功能 -->
    <script type="text/javascript" src="../../lib/kinggrid/signature.pc.min.js"></script>
    <%--<!-- 移动端端附加功能 -->--%>
    <%--<link rel="stylesheet" href="../../lib/kinggrid/core/kinggrid.plus.mobile.css">--%>
    <%--<script type="text/javascript" src="../../lib/kinggrid/signature.mobile.min.js"></script>--%>
    <!-- 手写端附加功能 -->

    <script type="text/javascript" src="../../lib/kinggrid/signature_pad.min.js"></script>
    <script type="text/javascript" src="../../lib/kinggrid/jquery.timer.dev.js"></script>

</head>
<style type="text/css">
    body{
        -webkit-user-select: auto!important;
        user-select: auto!important;
    }
    input,textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
        min-height: 20px;
        background-color: #ffffff;
        border: 1px solid #cccccc;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -webkit-transition: border linear .2s, box-shadow linear .2s;
        -moz-transition: border linear .2s, box-shadow linear .2s;
        -o-transition: border linear .2s, box-shadow linear .2s;
        transition: border linear .2s, box-shadow linear .2s;
    }
    input, textarea, .uneditable-input{
        width: auto;
    }
    select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
        display: inline-block;
        padding: 4px 6px;
    //margin-bottom: 10px;
        font-size: 13px;
        line-height: 20px;
        color: #555555;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
        vertical-align: middle;
    }
    input[disabled], select[disabled], textarea[disabled], select[readonly], textarea[readonly] {
        cursor: not-allowed;
        background-color: #eeeeee;
    }
    body{
        font-size: 15px;
    }
    .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
        padding: 0px;
    }
    .hideen{
        display: none;
    }
    .content{
        margin-top: 46px;
        margin-bottom: 52px;
    }
    /*设置原始元素样式*/
    #origin
    {
        margin:100px auto;/*水平居中*/
        width:200px;
        height:100px;
        border:1px dashed gray;
    }
    /*设置当前元素样式*/
    #current
    {
        width:200px;
        height: 28px;
        line-height: 26px;
        color:white;
        background-color: #007BEE;
        text-align:center;
        transform:rotate(0deg);
        -webkit-transform:rotate(0deg);  /*兼容-webkit-引擎浏览器*/
        -moz-transform:rotate(0deg);     /*兼容-moz-引擎浏览器*/
        transition:all 0.5s ease-in-out;

    }
    #current:hover{
        transform: rotate(360deg);
        -webkit-transform:rotate(360deg) ;
        -moz-transform:rotate(360deg) ;
    }
    .feedbacktitle{
        position: relative;
        top:3px;
        font-weight: bold;
        margin-left: 10px;
    }
    .feedbackcontent{
        margin-left: 23px;
    }
    .backinfo{
        width:100%;
        height: 100px;
    }
    .cont{
        position: relative;
    }
    .downloadBtn{
        cursor: pointer;
        margin-left: 10px;
        display: inline-block;
    }
    .deletefileBtn{
        color:#e01919!important;
        cursor: pointer;
        margin-left: 10px;
        display: inline-block;
    }
    .previewBtn{
        cursor: pointer;
        display: inline-block;
    }
    .editBtn{
        cursor: pointer;
        margin-left: 10px;
        display: inline-block;
    }
    #tab_c{
        width: 300px;
        height: 86%;
        /* display: none; */
        top: 43px;
        right: -316px;
        bottom: 0;
        position: fixed;
        background: #f8f8f8;
        overflow-y: scroll;
        box-shadow: -2px 0 20px 0px #c4c4c4;
        top: 47px;
        z-index: 9999999;
    }
    #tab_c,.cont_form{
        float:left;
    }
    .tab_one,#tab_ctwo{
        width:100%;
        height:100%;
    }
    .cont_ctwo{
        width:100%;
        height:100%;
    }
    .cont_cone{
        width:100%;
        height:auto;
    }
    .tab_one{
        width:100%;
        height: 200%;
    }
    .cont_cone li{
        width: 90%;
        height:56px;
        margin:10px auto;
        border: 1px solid #cccccc;
        border-radius: 3px;
        background: #fff;
    }

    .one_all,.two_all{
        width:100%;
        min-height:330px;
    }
    .one_all{
        border-bottom: 1px solid #ccc;
    }
    .item_logo,.item_word{
        float:left;
    }
    .item_logo{
        width: 40px;
        height: 40px;
        margin-left: 8px;
        margin-top: 8px;
    }
    .item_word{
        margin-top: 15px;
        margin-left: 8px;
        width: 195px;

    }
    .item_word .item_wordH1{
        text-align: left;
        color: #292929;
        font-size: 10pt;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .item_wordH1:hover{
        color: #1772c0;
    }
    .item_wordH2{
        font-size: 9pt;
        color: #1772c0;
        text-align: left;
        float: left;
        margin-left: 10px;
    }
    .position{
        position: absolute;
        right: 14px;
        top: 12px;
        clear: both;
    }
    .fujian_logo,.fujian_h1,.huiqian_logo,.huiqian_h1{
        float: left;

    }
    .fujian_logo{
        margin-top: 14px;
        width: 18px;
    }
    .huiqian_logo{
        margin-top: 15px;
        width: 14px;
    }
    .fujian_h1,.huiqian_h1{
        margin-left: 10px;
        font-size: 12pt;
        margin-top: 3px;
    }
    .huiqian_h1{
        line-height: 33px;
        font-weight: bold;
        font-size: 11pt;
        margin-top: 6px;
    }
    .add_fujian{
        margin: 0 auto;
        width: 90%;
        height: 30px;
        border-radius: 3px;
        background: #458de5;
        color: #fff;
        text-align: center;
        line-height: 30px;
        outline: none;
        margin-left: 13px;
        border: 1px solid #458de5;
    }
    .cont_ctwo li{
        width: 90%;
        height: 105px;
        border-radius: 3px;
        margin: auto;
        border:1px solid #cccccc;
        margin-top: 10px;
        background: #fff;
    }
    .huiqian_inp,.huiqian_send{
        float:left;
    }
    .hui_inp{
        width: 81% !important;
        margin-left: -56px !important;
    }
    .huiqian_inp{
        text-indent: 5px;
        width: 68%;
        height: 30px;
        border-radius: 3px;
        border: none;
        outline: none;
        text-align: left;
        border: 1px solid #cccccc;
        margin-left: 0px;
    }
    .huiqian_send{
        width: 58px;
        height: 32px;
        background: #ff9b30;
        color: #fff;
        margin-left: 210px;
        outline: none;
        border-radius: 3px;
        border: 1px solid #ff9b30;
    }
    .huiqian_word{
        height:100%;
        margin-left: 12px;
        text-align: left;
    }
    .huiqian_word h1{
        margin-top: 10px;
    }
    .huiqian_word .h2s{
        color: #999;
        word-spacing: 0;
        -webkit-touch-callout: initial;
        -webkit-user-select: auto;
        -khtml-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
        user-select: auto;
    }
    .huiqian_touxiang{
        margin-left: 8px;
    }
    .huiqian_touxiang,.huiqian_word{
        float: left;
    }
    .huiqian_word h3{
        overflow: hidden;/*内容超出后隐藏*/
        text-overflow: ellipsis;/* 超出内容显示为省略号*/
        white-space: nowrap;/*文本不进行换行*/

    }
    .huiqian_touxiang{
        width: 40px;
        height: 40px;
    }
    .layui-layer-page .layui-layer-content {
        overflow-x: hidden !important;
    }

    .head{
        background: linear-gradient(to bottom,#196fe3,#2497e0);
        FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0, startColorStr=#196fe3, endColorStr=#2497e0);
        background: -ms-linear-gradient(top, #196fe3, #2497e0);
        background: -moz-linear-gradient(top, #196fe3, #2497e0);
        background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#196fe3), to(#2497e0));
        background: -webkit-linear-gradient(top, #196fe3, #2497e0);
        background: -o-linear-gradient(top, #196fe3, #2497e0);
    }
    .step,.num{
        color: #fff;
    }
    .abs_right ul{
        background: #fff;
    }
    .fujian a, .huiqian a{
        font-weight: 300;
    }
    #tab_t ul li{
        font-weight: 300;
    }

    .check{
        background: #5caeee;
    }

    /*.choose{
       color:#fff;
        background:#4889f0 !important;
    }*/
    #remind_name,#jingban{
        height: 20px !important;
    }
    .workflow-node {
        padding: 0px !important;
    }
    .prcsName{
        font-size: 14px;
        border: 1px solid #3691da;
        color: #3691da;
        margin-bottom: 10px;
        width: 100%;
        height: 35px;
        background: url("../../../img/workflow/work/add_work/uncheck.png") no-repeat 10px center;
    }
    .prcsName h1 {
    //text-align: center;
        line-height: 35px;
        white-space: nowrap;
        margin-left: 30px;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 140px;
    }
    .prcsName_chang{
        border: none;
        color:#fff;
        background: #3691da  url("../../../img/workflow/work/add_work/checked.png") no-repeat 10px center;
    }
    .fujian a,.huiqian a{
        width: 70px;
        height: 28px;
        display: block;
        text-decoration: none;
    }
    .top_one{
        position: absolute;
        top: 0px;
    }
    .top_two{
        position: absolute;
        top: 696px;
    }
    #tab_c{
        transition: all 1s ease 0s;
    }
    .list_table{
        border-width: medium;
        border-style: none;
        border-color: initial;
        border-collapse: collapse;
        word-wrap: break-word;
        table-layout: fixed;
    }
    .list_table .head {
        font-weight: 600;
    }
    .list_table td{
        border-bottom: #7F7F7F 1pt solid;
        /* border-left: #000000 2.25pt solid; */
        text-align: center;
    //width: 50px;
        padding-bottom: 1px;
        padding-left: 1px;
        padding-right: 1px;
        vertical-align: middle;
        border-top: #7F7F7F 1pt solid;
        border-right: black 1pt solid;
        padding-top: 1px;
        padding: 0;
    }
    .modal-body{
        overflow-y: hidden;
    }
    .layui-layer-btn-{
        border-top: 1px solid #d6d6d6;
        background-color: #f6f6f6;
    }
    .layui-layer-title{
        color: #fff;
        font-size: 16px;
        font-family: Microsoft yahei,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;
        background:linear-gradient(to bottom,#2077c6,#2495df);
        FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0, startColorStr=#2077c6, endColorStr=#2495df);
        background: -ms-linear-gradient(top, #2077c6, #2495df);        /* IE 10 */
        background:-moz-linear-gradient(top, #2077c6, #2495df);/*火狐*/
        background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#2077c6), to(#2495df));  /* Safari 4-5, Chrome 1-9*/
        background: -webkit-linear-gradient(top, #2077c6, #2495df);   /*Safari5.1 Chrome 10+*/
        background: -o-linear-gradient(top, #2077c6, #2495df);  /*Opera 11.10+*/
    linear-gradient(to bottom, hsl(0, 80%, 70%), #2077c6); /* Standard syntax; must be last */
    }
    .orgAdd{
        display: inline-block;
        margin-top: 10px;
        cursor: pointer;
    }
    .orgClear{ cursor: pointer;}
    .userSelectBtn{
        background: url(../../img/userSelectButton.png) no-repeat -5px -2px;
        width: 102px!important;
        height: 29px;
        cursor: pointer;
        margin-left: 15px;
        padding: 0;
        border-width: 1px;
        border-style: solid;
        border-radius: 4px;
        margin-top: 5px;
    }
    .userSelectBtn:hover {
        background: url(../../img/userSelect.png) no-repeat -5px -2px;
    }
    .tabAB{
        float: left;
        position: absolute;
        background-color: #fff;
        margin-left:50%;
        width:140px;
        height:28px;
        margin-top:8px;
        display: none;
        border-radius: 6px;
    }
    .tabAB ul{
        width: 141px;
        height: 28px;
        border: 1px solid #fff;
        border-radius: 5px;
        background: #fff;
    }
    .tabAB ul li{
        height: 28px;
        line-height: 28px;
        width: 70px;
        color: #4889f0;
        cursor: pointer;
        text-align: center;
        border-radius: 5px;
    }
    .tabAB ul li.active{
        background: #4889f0;
        color: #fff;
    }
    .tabAB ul li:hover{
        background: #4889f0 ;
        color:#fff;
    }
    .clearfix:after{
        clear: both;
        display: block;
        content: '';
    }
    .fl{
        float: left;
    }
    .fr{
        float: right;
    }
    .officialDocument{
        width: 100%;
        height: 99%;
    }
    .officialDocumentLeft{
        width: 15%;
        float: left;
        border: 1px solid #4889f0;
        min-height: 400px;
        border-radius: 4px;
        margin-left:1%;
    }
    .officialDocumentLeft li{
        height: 50px;
        line-height: 49px;
        font-size: 14pt;
        text-align: center;
        font-weight: bold;
    }
    .officialDocumentLeft li:hover{
        background: #4889f0;
        color: #fff;
        cursor: pointer;
    }
    .officialDocumentLeft li.active{
        background: #4889f0;
        color: #fff;
    }
    .officialDocumentRight{
        width: 80%;
        border: 1px solid #4889f0;
        min-height: 400px;
        border-radius: 4px;
        float: right;
        margin-right:2%;
    }


    .wrap{
        width:100%;
        height:100%;
        float: left;
        clear:both;
    }
    .left_side,.right_side{
        float: left;
    }
    .left_side {
        width: 15%;
        height: 100%;
        background: #eff5f2;
    }
    .right_side{
        width:84%;
    }
    .btn {
        height: 36px;
        margin: auto;
        margin-top: 16px;
        line-height: 36px;
        color: #fff;
        text-align: center;
        cursor: pointer;
    }
    .big_btn{
        width: 70%;
        border: 1px solid rgb(5, 88, 197);
        background: #047dca;
    }
    .small_btn{
        width:40%;
        background: #fe3131;
        border:1px solid #D91600;
    }
    #EnterRevisionMode{
        width:100%;
        height:100%;
    }
    #EnterRevisionMode option{
        height: 36px;
    }
    .tipmsg{
        float: left;
        position: absolute;
        margin-left: 89px;
        margin-top: 27px;
        color: red;
        font-size: 11px;
    }
    .sms-bg-static{
        background: #d2d2d2 url("/img/images/sms-static.png") no-repeat left center;
    }
    .sms-bg-static.active{
        background: #3691da url(/img/images/sms.png) no-repeat left center;
    }
    .email-bg-static{
        background: #d2d2d2 url(/img/images/email-static.png) no-repeat left center;
    }
    .email-bg-static.active{
        background: #3691da url(/img/images/email.png) no-repeat left center;
    }

    .floatRight{
        position: absolute;
        top: -67px;
        width: 100px;
        height: auto;
        border: 1px solid #ccc;

    }
    .foot_rig ul li{
        color: #333;
    }
    .foot_rig ul li:hover{
        color: #fff;
    }
    #fenxiang{
        border-radius: inherit;
        background: url(/img/workflow/work/share.png)-3px -2px no-repeat;
    }
    #fenxiang:hover{
        color: #fff;
        background: url(/img/workflow/work/share2.png)-3px -2px no-repeat;
    }
    #guidang{
        border-radius: inherit;
        background: url(/img/workflow/work/guina.png)-3px -2px no-repeat;
    }
    #guidang:hover{
        color: #fff;
        background: url(/img/workflow/work/guina1.png)-3px -2px no-repeat;
    }
    #daochu{
        border-radius: inherit;
        background: url(/img/workflow/work/guina.png)-3px -2px no-repeat;
    }
    #daochu:hover{
        color: #fff;
        background: url(/img/workflow/work/guina1.png)-3px -2px no-repeat;
    }
    .foot_rig .floatRight>li{
        width: 100%;
        height: 28px;
    }
    .hide{display: none;}
    .show{ display: block;}
    .turnboxselect{
        margin-top: -20px;
    }
    .turnboxselectli{
        padding: 18px;
    }
    .workflow-node-result{
        border: none;
        width: 90%;
        height: auto
    }
    .work-prcs-content{
        border: none;
    }
    .work-prcs-title,.work-msg-title{
        background-color: #d6e7f8;
        color: #023964;
        font-size: 14px;
        position: relative;
    }
    .workflow-procs-nodes-wrap{
        width: 170px;
        margin-left: 30px;
    }
    .spantitles{
        position: absolute;
        width: 81px;
        bottom: 5px;
        left: 43px;
        color: #fff;
        font-size: 16px;
        margin-left: 0;
    }
    .workflow-node-sp{
        font-size: 11pt;
        font-weight: bold;
        padding-left: 15px;
    }
    .user-tags{
        background: #fff;
    }
    a{
        color: #333;
    }
    .users-select-block{
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .cytitle{
        position: absolute;
        left: 140px;
        font-size: 14px;
        color: #023964;
        top: 30px;
        width:190px;
    }
    .work-msg-op-title{
        font-size: 14px;
        color: #023964;
        width: 266px;
        position: relative;
        margin: 5px 0px 5px 0px;
    }
    .sms-check, .email-check, .mobile-check{
        width: 88px;
        height: 30px;
    }
    .gjtitles{
        height: 30px;
        position: absolute;
        line-height: 30px;
    }
    .xuanzhong{
        cursor: pointer;
        position: absolute;
        left: 93px;
        top: 5px;
        color: #666666;
    }
    .fujian a{
        color: #4889f0;
    }
    .saveformlo{
        width: 75px!important;
    }
    #saveform{
        height: 30px;
        color: #333;
        background: url(/img/workflow/work/save.png) no-repeat;
    }
    #saveform:hover{
        background: url(/img/workflow/work/save2.png) no-repeat;
        color: #fff;
    }


    .rig_h1{
        font-size: 14px;
        height: 30px;
        line-height: 30px;
    }
    .item_logo img{
        width: 40px;
    }
    #oneUploadFile li:last-child{
        margin-bottom: 24px;
    }
    /*定义滚动条宽高及背景，宽高分别对应横竖滚动条的尺寸*/
    /*公告*/
    #tab_c::-webkit-scrollbar,.people_wenjian::-webkit-scrollbar{
        width: 3px;
        height: 16px;
        background-color: #f8f8f8;
    }
    /*定义滚动条的轨道，内阴影及圆角*/
    #tab_c::-webkit-scrollbar-track,.people_wenjian::-webkit-scrollbar-track{
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
        border-radius: 10px;
        background-color: #f8f8f8;
    }
    /*定义滑块，内阴影及圆角*/
    #tab_c::-webkit-scrollbar-thumb,.people_wenjian::-webkit-scrollbar-thumb{
        width: 0px;
        height: 20px;
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
        background-color: #bbb;
    }
    body::-webkit-scrollbar,.people_wenjian::-webkit-scrollbar{
        width: 0px;
        height: 16px;
        background-color: #f5f5f5;
    }
    /*定义滚动条的轨道，内阴影及圆角*/
    body::-webkit-scrollbar-track,.people_wenjian::-webkit-scrollbar-track{
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
        border-radius: 10px;
        background-color: #f5f5f5;
    }
    /*定义滑块，内阴影及圆角*/
    body::-webkit-scrollbar-thumb,.people_wenjian::-webkit-scrollbar-thumb{
        width: 0px;
        height: 20px;
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
        background-color: #555;
    }
    #oneUploadFile{
        min-height: 199px;
    }
    .cesdiv{
        height: 35px;
        width: 100%;
        display: inline-block;
        word-wrap: break-word;
        overflow: hidden;
        font-size: 13px;
        margin-top: 5px;
        line-height: 18px;
    }
    .layui-row ul li{
        cursor: pointer;
        padding: 3px 5px;
    }
    #uploadinputimg{
        top: 0;
        position: absolute;
        width: 100%;
        height: 32px;
        display: inline-block;
        opacity: 0;
        z-index: 9999;
        filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
        color: #fff;
        margin: auto;
        margin-left: 15px;
        line-height: 30px;
        outline: none;
    }
    .edit  ,.del ,.save{
        padding-left:5px;
        cursor:pointer;
    }
    .uploadImg{
        cursor: pointer;
        position: absolute;
        width: 72px!important;
        height: 32px;
        left: 50%;
        margin-left: -36px;
        bottom: 0px;
        font-size: 12px;
        white-space: normal;
        line-height: 16px;
    }
    .imgfileBox img{
        margin: 0 10px!important;
    }
    .imgfileBox:after{
        height: 32px;
    }
    #TOP_FLAG_SHOW2_menu a:hover{
        background: #83C1DE;
        color: #FFF;
    }
    .refresh{
        border:none;
        background: none;
        padding-left: 10px;
        font-size:14px;
        color:#2567d6;
    }
    .imgfileBox{
        width: 72px;
        text-align: center;
        margin: 0 5px;
    }
    .imgfileBox img{
        margin: 0 10px!important;
    }
    .imgfileBox:after{
        height: 32px;
    }
    .hoverbox{
        position: absolute;
        background: #fff;
        right: -45px;
        width: 60px;
        z-index: 1001;
        top: 0;
        height: auto;
        padding: 2px 0;
        margin: 2px 0 0;
        list-style: none;
        background-color: #ffffff;
        border: 1px solid #ccc;
        border: 1px solid rgba(0,0,0,0.2);
        border-right-width: 2px;
        border-bottom-width: 2px;
        -webkit-border-radius: 6px;
        -moz-border-radius: 6px;
        border-radius: 6px;
        -webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        -moz-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        -webkit-background-clip: padding-box;
        -moz-background-clip: padding;
        background-clip: padding-box;
        display: none;
    }
    .hoverbox li{
        font-size: 9pt;
        cursor: pointer;
        color: #333333;
        padding: 0 5px;
    }
    .hoverbox li:hover{
        background-color: #0081c2;
        color: #fff;
    }
    .plotting{
        font-weight: normal;
        line-height: 20px;
        white-space: nowrap;
        font-size: 13px;
    }
    .websign {
        display: inline-block;
        margin: 0;
        padding: 0;
    }
    input.SmallButtonA {
        width: 50px;
        height: 21px;
        color: #36434E;
        background: url(/img/form/btn_a.png) no-repeat;
        border: 0px;
        cursor: pointer;
        -webkit-appearance: button;
        font-size: 12px;
        min-height: 20px;
        line-height: 20px;
        max-width: 100%;
    }
    #a2 input[type="button"] {
        background: url(/img/form/btn_a.png) no-repeat;
    }

    .eiderarea {
        position: relative;
    }
    
    .remove_sign {
        display: block !important;
        color: red;
        position: absolute;
        bottom: 27px;
        right: -14px;
        cursor: pointer;
    }
    
    .sign_content {
        cursor: pointer;
    }
</style>

<style id="table">.selectTdClass{background-color:#edf5fa !important}table.noBorderTable td,table.noBorderTable th,table.noBorderTable caption{border:1px dashed #ddd}table{margin-bottom:10px;border-collapse:collapse;display:table;}td,th{padding: 5px 10px;border-color: #DDD;}caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}th{border-top:1px solid #BBB;background-color:#F7F7F7;}table tr.firstRow th{border-top-width:2px;}.ue-table-interlace-color-single{ background-color: #fcfcfc; } .ue-table-interlace-color-double{ background-color: #f7faff; }td p{margin:0;padding:0;}</style>

<body >
<div id="tab_c">
    <div class="tab_one">
        <div class="one_all" id="fu">
            <ul class="cont_cone" style="position: relative">
                <li style="height:33px;line-height: 33px;position:relative;border:none;background: #f8f8f8;margin-top: 0;"><img class="fujian_logo" src="../../img/workflow/work/add_work/black1.png"><h1 class="fujian_h1" style="font-weight: bold;  font-size: 11pt;margin-top: 6px;"><fmt:message code="email.th.file" /></h1></li>
                <li id="img_none" style="background: #f8f8f8;width:100%;height:199px;text-align: center;line-height:32px;margin: 0px;border: none;"><img src="/img/workflow/work/add_work/img_nomessage_03.png" alt="" style="margin-top: 16px;">
                    <span style="display: block;color: #666;"><fmt:message code="main.th.Enclosure" /></span>
                </li>
                <div class="position backbtn"><img src="../../img/workflow/work/add_work/back.png"></div>
                <div id="oneUploadFile"></div>
            </ul>
            <div class="addFujianBox" style="position: relative;height: 15%;margin-bottom: 24px;margin-top: 24px;">
                <span style="display: inline-block;cursor: pointer;" class="add_fujian" id="add_fujian"><fmt:message code="email.th.addfile" /></span>
                <form id="uploadimgform" target="uploadiframe" action="workUpload?module=workflow"  enctype="multipart/form-data" method="post" >
                    <input type="file"  name="file" id="uploadinputimg" multiple class="w-icon5">
                    <input type="hidden" id="uprunId" name="runId">
                </form>
            </div>
        </div>
    </div>
</div>
<div class="body" style="display: none;height: 500px;">
    <div class="head" style="    position: fixed;z-index: 9999;top: 0px;">
        <div id="title" class="abs_left">
            <h1 class="num"></h1>
            <h2 class="step hideen"></h2>
            <div class="tabAB">
                <ul class="clearfix">
                    <li class="fl active" data-id="1" ><fmt:message code="workflow.th.form" /></li>
                    <li class="fl" style="margin-left: 1px" data-id="2" ><fmt:message code="main.th.text" /></li>
                </ul>
            </div>
        </div>

        <div id="tab_t" class="abs_right">
            <ul>
                <li class="fujian"><a  href="#fu"><fmt:message code="email.th.file" /></a></li>
                <li class="huiqian" ><a  href="#hui"><fmt:message code="document.th.JointlySign" /></a></li>
                <li class="liucheng"><fmt:message code="doc.th.TechnologicalProcess" /></li>
                <li class="guanlian" style="border-right: none"><fmt:message code="document.th.Relation" /></li>
            </ul>
        </div>
    </div>
    <div class="content" style="height: 100%;">
        <div class="cont" id="client">
            <div class="cont_form" id="a2" style="float: none;">
            </div>
            <div class="officialDocument clearfix" style="display: none">
                <iframe id="zw" name="zw" src="" frameborder="0" scrolling="yes" height="100%" width="100%" noresize="noresize" tid="2"></iframe>
            </div>
            <div style="width: 100%;height: 52px;"></div>
        </div>
        <div class="foot">
            <div class="foot_rig" id="foot_rig" >
                <ul>
                    <li class="rig_li saveformlo" id="saveform"><h1 class="rig_h1" style="width: 90px;"><fmt:message code="global.lang.save" /></h1></li>
                </ul>
            </div>

        </div>
    </div>
    <div id="printdiv">
    </div>

    <div id="readcommentstpl" class="layui-fluid layui-form " style="display:none;">
        <div class="layui-row layui-rows">
            <div class="layui-col-md12">
                <fieldset class="layui-elem-field layui-field-title" style="margin: 0;">
                    <legend style="display: inline-block;width: 5em;border: 0;margin-bottom: 0;"> [送]方式</legend>
                </fieldset>

                <ul class="fl clearfix" style="padding-left: 35px;box-sizing: border-box;">
                    <li class="layui-badge" style="margin: 5px">请</li>
                    <li class="layui-badge" style="margin: 5px">送</li>
                    <li class="layui-badge" style="margin: 5px">拟请</li>
                    <li class="layui-badge" style="margin: 5px">转</li>
                    <li class="layui-badge" style="margin: 5px">有请</li>
                    <li class="layui-badge" style="margin: 5px">请各位领导</li>

                </ul>
            </div>
        </div>
        <div class="layui-row layui-rows" style="padding-top: 22px;">
            <fieldset class="layui-elem-field layui-field-title" style="margin: 0;">
                <legend style="display: inline-block;width: 9em;border: 0;margin-bottom: 0;">请选择部门和人员</legend>
            </fieldset>

            <div class="layui-col-md12">

                <select name="" class="select1" id="select11" style="vertical-align: middle;width: 29%;    margin-left: 35px; margin-right: 10%;" num="1">
                    <option value="">请选择部门</option>

                </select>
                <select name="" id="select2" style="vertical-align: middle;width: 29%;" num="2">
                    <option value="">请选择人员</option>

                </select>
            </div>

        </div>
        <div class="layui-row layui-rows">
            <div class="layui-col-md12">
                <fieldset class="layui-elem-field layui-field-title" style="margin:0">
                    <legend style="display: inline-block;width: 5em;border: 0;margin-bottom: 0;">处理方式</legend>
                </fieldset>

                <ul class="fl clearfix" style="padding-left: 35px;box-sizing: border-box;">
                    <li class="layui-badge" style="margin: 5px">办理</li>
                    <li class="layui-badge" style="margin: 5px">已阅</li>
                    <li class="layui-badge" style="margin: 5px">阅示</li>
                    <li class="layui-badge" style="margin: 5px">阅</li>
                    <li class="layui-badge" style="margin: 5px">提出意见</li>
                    <li class="layui-badge" style="margin: 5px">批示</li>
                    <li class="layui-badge" style="margin: 5px">协办</li>
                    <li class="layui-badge" style="margin: 5px">研酌</li>
                    <li class="layui-badge" style="margin: 5px">同意</li>
                    <li class="layui-badge" style="margin: 5px">不同意</li>
                    <li class="layui-badge" style="margin: 5px">研阅</li>
                    <li class="layui-badge" style="margin: 5px">复印</li>
                </ul>
            </div>


        </div>
        <div class="centertion" style="width:100%;margin-left: 35px;margin-top: 10px; box-sizing: border-box">
            <textarea name="" id="" cols="30" rows="5" style="width: 84%;"></textarea>
        </div>
    </div>
    <script type="text/javascript" src="/js/spirit/qwebchannel.js"></script>
    <script>
        function isExitsFunction(funcName) {//判断是否是一个方法
            try {
                if (typeof(eval(funcName)) == "function") {
                    return true;
                }
            } catch(e) {}
            return false;
        }

        //控制高度
        layer.load();
        $.ajax({
            url: "../../department/getAlldept",
            type: 'get',
            data: {},
            dataType: 'json',
            success: function (obj) {
                var data = obj.obj;
                departmentData = digui(data, 0);
                var str = departmentChild(departmentData, '<option value="-1">请选择部门</option>', 0, -1);
                $('#select11').html(str);
            },
            error: function () {
            }
        });
        $('.body').show();

        function autodivheight(){
            var winHeight=0;
            if (window.innerHeight)
                winHeight = window.innerHeight;
            else if ((document.body) && (document.body.clientHeight))
                winHeight = document.body.clientHeight;
            if (document.documentElement && document.documentElement.clientHeight)
                winHeight = document.documentElement.clientHeight;
            winWidth = document.documentElement.clientWidth;
            document.getElementById("client").style.height= winHeight - 95 +"px";
        }
    </script>
    <script>
        parent.opener = window.opener;
        var globalData = {};
        var flowrunId=null;
        var eventas=null;
        window.onresize = function(){
            $('#tab_c').css('height',$('body').height()-52);
        };

        function buildFormData(){
            var arr = {};
            $(".cont_form").find('.form_item').each(function(i,v){
                var _this = $(this);
                arr[_this.attr('title')] = _this.attr('name');
            });
            return arr;
        }

        //点击保存按钮
        function saveFlowData(cb) {
            var flowfun = globalData.flowRun;
            var form_item=$('.cont_form .form_item');
            var realData=[];
            var radioArr = {};
            var modifydata =[];
            var flag = false;
            var arr = [];
            for(var i=0;i<form_item.length;i++){
                var baseData={};
                var value="";
                var obj = form_item.eq(i);
                var datatype = obj.attr("data-type");
                var key=obj.attr("name");
                var ismust = obj.attr('ismust');
                if(datatype=="select"){
                    if(obj.val() == null){
                        value = '';
                    }else{
                        value= obj.val()==0?'':form_item.eq(i).val();
                    }
                }else if(datatype=="textarea" ){
                    value=obj.val();
                    if(obj.attr('rich') == 1){
                        var id = obj.attr('id').split('DATA_')[1];
                        value = UE.getEditor('container'+id).getContent()||obj.val();
                    }
                }else if(datatype=="text"){
                    value=obj.val();
                }else if(datatype=="checkbox"){
                    if(obj.is(':checked')){
                        value = '1';
                    }else{
                        value = '0'
                    }
                }else if(datatype=="macros"){
                    if(obj.attr('type') == "text" || obj[0].type == 'text'){
                        if(obj.attr('datafld')=='SYS_USERNAME'&&obj.attr('orgsignImg')==1){
                            if(obj.prev().find('img').attr('src')!=undefined&&obj.prev().find('img').attr('src')!=''){
                                value = obj.prev().find('img').attr('src')
                            }else{
                                if(obj.val()=='{macros}'){
                                    var datafld = obj.attr('datafld');
                                    value = workForm.tool.getMacrosData(datafld)||''
                                }else{
                                    value= obj.val();
                                }
                            }
                        }else{
                            if(obj.val()=='{macros}'){
                                var datafld = obj.attr('datafld');
                                value = workForm.tool.getMacrosData(datafld)||''
                            }else{
                                value= obj.val();
                            }
                        }

                    }else{
                        if(obj.val() > -1 || obj.val()!=""){
                            value = obj.val()+'_'+obj.find("option:selected").text();
                        }
                    }
                }else if(datatype == "radio"){
                    var name = obj.attr('name');
                    if(!radioArr[obj.attr('name')]){
                        radioArr[obj.attr('name')] = true;
                        if($("input[name='"+name+"']:checked").length>0){
                            value= $("input[name='"+name+"']:checked").val();
                        }else{
                            value = "";
                        }
                    }else{
                        continue;
                    }
                }else if(datatype == "macrossign"){
                    value= obj.html();

                }else if(datatype == "fileupload"){
                    var name = obj.attr('name');
                    $('img[name='+name+']').each(function(i,v){
                        var atturl = $(v).attr('atturl');
                        var url = $(v).attr('src');
                        if(atturl != undefined && atturl != '' && atturl.indexOf(',') > -1){
                            atturl = atturl.replace(/\,/g, "%2c");
                        }
                        if(url!='/img/fileupload.png'&&url!='/img/icon_uploadimg.png'){
                            value+= (atturl+'*');
                        }
                    })
                    if(value == ''){
                        value = 'delete';
                    }
                }else if(datatype == "imgupload"){
                    var name = obj.attr('name');
                    $('img[name='+name+']').each(function(i,v){
                        var url = $(v).attr('src');
                        if(url!='/img/icon_uploadimg.png'){
                            var str = decodeURI(url);
                            var strs = str.split('&ATTACHMENT_NAME=')[0];
                            var name = str.split('&ATTACHMENT_NAME=')[1].split('&FILESIZE=')[0];
                            var attName = decodeURI(name).replace(/\%2b/g, "+").replace(/\%40/g,"@").replace(/\%23/g,"#").replace(/\%26/g,"&").replace(/\%2F/g,"/").replace(/\%3F/g,"?").replace(/\%ef%bf%a5/g,"￥").replace(/\%24/g,"$").replace(/\%ef%bc%81/g,"！").replace(/\%ef%bc%88/g,"（").replace(/\%ef%bc%89/g,"）").replace(/\%e2%80%a6%e2%80%a6/g,"…");
                            var atturl =strs+"&ATTACHMENT_NAME="+attName+"&FILESIZE="+str.split('&ATTACHMENT_NAME=')[1].split('&FILESIZE=')[1];
                            if(atturl != undefined && atturl != '' && atturl.indexOf(',') > -1){
                                atturl = atturl.replace(/\,/g, "%2c");
                            }
                            value+= (atturl+'*');
                        }
                    })
                    if(value == ''){
                        value = 'delete';
                    }
                }else if(datatype == "sign"){
                    var valueSign = obj.val();
                    var pre = obj.prev();
                    if(valueSign){
                        value = Mustache.render(pre.find('.eiderarea').eq(pre.find('.eiderarea').length-1).prop("outerHTML"),{content:''});
                    }else{
                        value = "";
                    }
                    
                    // 获取当前会签控件所有的意见，后台有的是覆盖的方法保存的，只获取当前的意见会导致之前的意见丢失
                    var $eiderarea = pre.find('.eiderarea');
                    if ($eiderarea.length > 1) {
                        var prevStr = '';
                        for (var j = 0; j < $eiderarea.length - 1; j++) {
                            prevStr += $eiderarea.eq(j).prop('outerHTML')
                        }
                        value = prevStr + value;
                    }
                }else if(datatype == "userselect"){
                    if(obj.attr('user_id')){
                        value = (obj.attr('user_id')||'')+'|'+ (obj.attr('username')||'');
                    }else{
                        value = obj.attr('username')||'';
                    }
                }else if(datatype == "deptselect"){
                    if(obj.attr('deptid')){
                        value= (obj.attr('deptid') || '')+'|'+(obj.attr('deptname')||'');
                    }else{
                        value = "";
                    }
                }else if(datatype == "kgsign"){
                    value = (obj.attr('signatureId') || '');
                }else if(datatype == "listing"){
                    var vtrStr = [];
                    var vsumStr = [];
                    obj.find('tr').each(function(){
                        if($(this).attr('class') != 'listhead' && $(this).attr('class')!= 'listfoot'){
                            var  listTdObj = $(this).find('td');
                            if($(this).attr('class') == 'listsum'){
                                listTdObj.each(function (i,v) {
                                    var _this = $(v);
                                    if(_this.attr('class')!='sumtitle'){
                                        vsumStr.push(_this.html());
                                    }
                                });
                            }else{
                                var vtdStr = []
                                listTdObj.each(function (i,v) {
                                    var _this = $(v);
                                    var listtype = $(v).attr('listtype');
                                    switch (listtype){
                                        case 'text':
                                            vtdStr.push(_this.find('input').val());
                                            break;
                                        case 'textarea':
                                            vtdStr.push(_this.find('textarea').val());
                                            break;
                                        case 'select':
                                            vtdStr.push(_this.find('select').val());
                                            break;
                                        case 'radio':
                                            var name = _this.find('input').eq(0).attr('name');
                                            vtdStr.push($('input[name="'+name+'"]:checked').val());
                                            break;
                                        case 'checkbox':
                                            var checkboxStr = [];
                                            _this.find('input:checked').each(function(i,v){
                                                checkboxStr.push($(v).attr('value'));
                                            });
                                            vtdStr.push(checkboxStr.join(','));
                                            break;
                                        case 'datetime':
                                            vtdStr.push(_this.find('input').val());
                                            break;
                                        case 'dateAndTime':
                                            vtdStr.push(_this.find('input').val());
                                            break;
                                        case 'formula':
                                            vtdStr.push(_this.text())
                                            break;
                                        default:
                                    }

                                });
                                vtrStr.push(vtdStr.join('`'))
                            }

                        }
                    });
                    value = vtrStr.join('\r\n') +'|'+vsumStr.join('`');
                }else if(datatype == 'readcomments'){
                    value = obj.val();
                }else{
                    value = obj.val();
                }

                baseData["key"]=key;
                baseData["value"]=value;
                realData.push(baseData);
                arr.push(key);

                modifydata.push(baseData);

            }
            var nary = arr.sort();
            var cf = [];
            for(var i = 0; i < nary.length - 1; i++){
                if (nary[i] == nary[i+1]) {
                    cf.push(nary[i]);
                }
            }
            var thisrunName= $('.runname').val();
            //判断表单中name是否有重复
            if(cf.length ==0){
                var fdata={
                    flowId:flowfun.flowId,
                    formdata:JSON.stringify(realData),
                    runId:flowfun.runId,
                    runName:thisrunName
                };
                var list = Signature.list;
                var signatureCreator = Signature.create();
                var kgsignList=$('.cont_form .kgsign');
                kgsignList.each(function(){
                    var value = $(this).attr('value');

                    var key = ($(this).attr('signatureid') || '').split(',');
                    key.forEach(function (v,i) {
                        if(list[v]){
                            signatureCreator.saveSignature(flowfun.runId, v, list[v].getSignatureData());
                        }
                    })
                });
                var indexzhuanjiao = layer.load(1);
                $.ajax({
                    type: "post",
                    url: "../../workflow/work/editWorkfrom",
                    dataType: 'JSON',
                    data: fdata,
                    success: function(res){
                        var data ={};
                        if(cb){
                            if(res.flag){
                                data['flag'] = true;
                            }else{
                                data['flag'] = false;
                            }
                            data.data = res.obj;
                            data.opt = fdata;
                            layer.close(indexzhuanjiao)
                            cb(data)
                        }
                    }
                });

            }else{
                var arr2 = [];
                for(var i=0;i<cf.length;i++){
                    var xz = $('[name='+cf[i]+']');
                    var arr1 = [];
                    for(var j=0;j<xz.length;j++){
                        if(xz.eq(j).attr('title') != undefined){
                            arr1.push(xz.eq(j).attr('title'));
                        }
                    }
                    arr2.push(arr1);
                }
                var syrs = '保存失败，存在重复字段：';
                for(var z=0;z<arr2.length;z++){
                    for(var h = 0;h<arr2[z].length;h++){
                        var q = h+1;
                        if(q != arr2[z].length){
                            syrs += arr2[z][h]+'与'
                        }else{
                            syrs += arr2[z][h]+'；'
                        }
                    }
                }
                layer.msg(syrs, {icon: 2});
            }
        }
        /**********************************************/

        $(function(){
            var iconImgType = {
                txt : '/img/workflow/work/txt.png',
                jpg : '../../img/icon_image.png',
                png : '../../img/icon_image.png',
                pdf :  '/img/workflow/work/pdf.png',
                ppt : '/img/workflow/work/ppt.png',
                pptx :  '/img/workflow/work/ppt.png',
                doc : '/img/workflow/work/doc.png',
                docx : '/img/workflow/work/doc.png',
                xls :  '/img/workflow/work/xls.png',
                xlsx :  '/img/workflow/work/xls.png',
                rar: '/img/workflow/work/rar.png',
                zip: '/img/workflow/work/zip.png',
                html: '/img/workflow/work/html.png',
                xmind: '/img/workflow/work/xmind.png'
            };

            var flowId = $.getQueryString("flowId")||'';
            var flowStep = $.getQueryString("flowStep") || '';
            var prcsId = $.getQueryString("prcsId") || '';
            var runId = $.getQueryString("runId") || '';
            var tableName = $.getQueryString("tableName") || '';
            var tabId =  $.getQueryString("tabId") || '';
            var isNomalType =  $.getQueryString("isNomalType") || '';
            var opflag =  $.getQueryString("opflag") || '';
            var type = $.getQueryString("type") || '';
            var guide = $.getQueryString("guide") || '';
            var navigatorName = "Microsoft Internet Explorer";
            var gobackIndex = 0;
            var isIE = false;
            //附件区附件回显
            function initUpload(runId) {
                $.ajax({
                    type: "get",
                    url: "findworkUpload",
                    dataType: 'JSON',
                    data: {
                        runId:runId
                    },
                    success: function (obj) {
                        if(obj.flag){
                            var str = '';
                            obj.obj.forEach(function (v,i) {
                                var attachName = v.attachName;
                                var fileExtension=attachName.substring(attachName.lastIndexOf(".")+1,attachName.length);//截取附件文件后缀
                                var imgurl = iconImgType[fileExtension] || '/img/workflow/work/zip.png';
                                var str2 = '';
                                var style = 'margin-left: 0px;';
                                var downbtn = 'display: block;';
                                var editbtn = 'display: block;';
                                var deletebtn = 'display: block;';
                                var attName = encodeURI(attachName).replace(/\+/g, "%2b").replace(/\@/g,"%40").replace(/\#/g,"%23").replace(/\&/g,"%26").replace(/\//g,"%2F").replace(/\?/g,"%3F").replace(/\￥/g,"%ef%bf%a5").replace(/\$/g,"%24").replace(/\！/g,"%ef%bc%81").replace(/\（/g,"%ef%bc%88").replace(/\）/g,"%ef%bc%89").replace(/\…/g,"%e2%80%a6%e2%80%a6");
                                var fileExtensionName=attName.substring(0,attName.lastIndexOf("."));
                                var attachmentUrl = v.attUrl;
                                attachmentUrl = attachmentUrl.substring(0,attachmentUrl.lastIndexOf("ATTACHMENT_NAME="))+"ATTACHMENT_NAME="+fileExtensionName+"."+fileExtension; //处理附件名字
                                if(fileExtension == 'doc' || fileExtension == 'DOC'|| fileExtension == 'docx' || fileExtension == 'DOCX'|| fileExtension == 'xls' || fileExtension == 'XLS'|| fileExtension == 'xlsx' || fileExtension == 'XLSX'|| fileExtension == 'ppt' || fileExtension == 'PPT'|| fileExtension == 'pptx'|| fileExtension == 'PPTX'){
                                    str2 = '<h2 attUrl="'+attachmentUrl+'" class="editBtn item_wordH2" style="'+ editbtn +'"><fmt:message code="global.lang.edit" /></h2> ';
                                }
                                str += '<li><div class="item_logo"><img src="'+imgurl+'"></div>' +
                                    '<div class="item_word" style="margin-top: 8px;letter-spacing: 1px;"><h1 class="item_wordH1" style="font-size: 11pt;" title="'+v.attachName+'">'+v.attachName+'</h1><h2></h2></div>' +
                                    '<div class="item_word" style="margin-top: 2px;font-size: 9pt;">'+function(){
                                        if($.UrlGetRequest('?'+v.attUrl) != 'exe' && $.UrlGetRequest('?'+v.attUrl) != 'rar' && $.UrlGetRequest('?'+v.attUrl) != 'zip'&& $.UrlGetRequest('?'+v.attUrl) != 'key'&& $.UrlGetRequest('?'+v.attUrl) != 'numbers'&& $.UrlGetRequest('?'+v.attUrl) != 'pages'){
                                            style = 'margin-left: 10px;';
                                            if(fileExtension == 'pdf' || fileExtension == 'PDF'|| fileExtension == 'png' || fileExtension == 'PNG' || fileExtension == 'jpg' || fileExtension == 'JPG'|| fileExtension == 'txt'|| fileExtension == 'TXT') { //判断是否需要查阅
                                                return '<h1 class="previewBtn item_wordH2" style="margin-left: 0;" attUrl="'+encodeURI(attachmentUrl)+'">查阅</h1>';
                                            }else{
                                                return '<h1 class="previewBtn item_wordH2" style="margin-left: 0;" attUrl="'+attachmentUrl+'">查阅</h1>';
                                            }
                                        }else{
                                            return '';
                                        }
                                    }()+ '<h1 class="downloadBtn item_wordH2" attUrl="'+encodeURI(attachmentUrl)+'" style="'+ style + downbtn + '"><fmt:message code="file.th.download" /></h1>'+
                                    str2+
                                    '<h1 class="deletefileBtn item_wordH2" attUrl="'+encodeURI(attachmentUrl)+'" style="'+ deletebtn +'"><fmt:message code="global.lang.delete" /></h1>'+
                                    '</div></li>';
                            });
                            if( obj.obj.length>0){
                                $('#img_none').hide();
                            }
                            if(obj.obj.length ==0){
                                $('#oneUploadFile').hide();
                            }
                            $('#oneUploadFile').html(str)
                        }
                    }
                });
            }
            /**********************************************/
            $('title').html('流程编辑');
            $('.cont_cthr').find('iframe').prop('src','/flowSetting/processDesignToolsT?type=2&flowId='+flowId);
            $('#uploadimgform').attr('action','workUpload?module=workflow&flowPrcs='+flowStep+'&runId='+runId);
            $('#tab_c').css({
                'right': -($('#tab_c').width()+30),
                'height':$('body').height()-52,
                'top':$('.head').height()
            });

            //ie浏览器附件区域判断
            if( navigator.appName == navigatorName ){
                isIE = true;
                $('#uploadinputimg').css({
                    'opacity':'1',
                    'filter': 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'
                })
                $('#add_fujian').hide();
            }else{

            }
            /**********************************************/

            //公文正文模块内容
            if(isNomalType == 'false'){
                $('.tabAB').show();
                $('.tabAB ul li').click(function () {
                    if ($(this).attr('data-id') == 2) {
                        if(tabId != ''){
                            autodivheight();
                            $('#zw').prop('src','../../common/webOffice?tabId='+tabId+'&tableName='+tableName);
                        }
                    }
                });

                $('.tabAB ul li').click(function () {
                    $(this).siblings().removeClass('active');
                    $(this).addClass('active');
                    if($(this).attr('data-id')==1){
                        $('#a2').show();
                        $('#tab_t').show();
                        $('.officialDocument').hide()
                    }else {
                        $('#a2').hide();
                        $('#tab_t').hide();
                        $('.officialDocument').show()
                    }
                });
            }else{
                $('.opt').show();
                $('.step').show()
            }
            /**********************************************/

            //引入方法
            workForm.init({
                formhtmlurl:'../../workflow/work/workfastAdd',//URL
                resdata:{
                    flowId:flowId,
                    runId:runId,
                    prcsId:prcsId,
                    flowStep:flowStep
                },
                flowStep:prcsId,//预览
                target:'.cont_form'
            },
            function (data,option) {
                workForm.inited = true;
                fromDataReject = buildFormData();
                var obj = data.object;

                runId = obj.flowRun.runId;
                flowrunId = obj.flowRun.runId;
                globalData.obj = obj;
                globalData.flowRun = obj.flowRun;
                globalData.isViewPriv = obj.isViewPriv;
                globalData.listFp = obj.listFp;
                globalData.listTurnPriv = obj.listTurnPriv;
                globalData.flowRunPrcs = obj.flowRunPrcs;
                globalData.option = option;
                globalData.listView = obj.listView;
                globalData.flowTypeModel = obj.flowTypeModel;
                globalData.conditionDesc = obj.conditionDesc;
                globalData.prcsIn = obj.prcsIn;
                globalData.flowProcesses = obj.flowProcesses;
                globalData.prcsInSet = obj.prcsInSet;
                globalData.prcsOut = obj.prcsOut;
                globalData.prcsOutSet = obj.prcsOutSet;
                globalData.gatherNodePriv = obj.gatherNodePriv;
                globalData.userName = obj.userName;

                globalData.checkTurnPriv = obj.checkTurnPriv
                globalData.feedback = obj.feedback
                globalData.flowPrcs=obj.flowRunPrcs.flowPrcs
                globalData.flowFormType = obj.flowFormType
                flowPrcs =  obj.flowRunPrcs.flowPrcs;
                prcsPrivlist = option.prcsPrivlist;
                prcsUserlist = option.prcsUserlist;
                prcsDeptlist = option.prcsDeptlist;
                attachPriv = obj.attachPriv;
                signlock = obj.signlock;

                initUpload(runId);
                var titleName= 'NO.&nbsp'+obj.flowRun.runId+'&nbsp;<input type="text" class="runname" value="' +obj.flowRun.runName+ '" style="width: 300px;font-size: 14px;">';
                $('.num').html(titleName);
                $('#uprunId').val(flowrunId)
                /*********工作流编辑，判断附件区****************************/
                if(data.object.flowTypeModel.flowDoc != 1){
                    $('.addFujianBox').hide();
                }
                /**************************************************************/
            });
            /**********************************************/
            function checkttachPriv(privNum){
                if(attachPriv.indexOf(privNum) > -1){
                    return true;
                }
                return false   ;
            }
            //公共附件 点击上传
            $('#add_fujian').click(function () {
                $('#uprunId').val(flowrunId);
                $('#uploadinputimg').click();

            })
            $('#uploadinputimg').change(function(e){
                layer.load();
                $('#uploadimgform').ajaxSubmit({
                    type: 'post',
                    success: function (res) {
                        res = $.parseJSON(res);
                        if(res.flag){
                            $('#uploadinputimg').val('');
                            var data=res.obj;
                            var str='';
                            var editdisplay = 'display:inline-block;'
                            var deletedisplay = 'display:inline-block;'
                            var downloaddisplay = 'display:inline-block;'

                            data.forEach(function (v,i) {
                                var arr = v.attachFile.split('.');
                                var imgurl = iconImgType[arr[arr.length-1]] || '/img/workflow/work/zip.png';
                                var str2 = '';
                                var style = 'margin-left: 0px;';
                                if(imgurl.substring(imgurl.lastIndexOf('/')+1,imgurl.lastIndexOf('.'))=='doc'){
                                    str2 = '<h2 attUrl="'+encodeURI(v.attUrl)+'" class="editBtn item_wordH2" style="'+ editdisplay +'"><fmt:message code="global.lang.edit" /></h2> ';
                                }
                                str += ' <li><div class="item_logo"><img src="'+imgurl+'"></div>' +
                                    '<div class="item_word" style="margin-top: 8px;letter-spacing: 1px;"><h1 class="item_wordH1" style="font-size: 11pt;" title="'+v.attachName+'">'+v.attachName+'</h1><h2></h2></div>' +
                                    '<div class="item_word" style="margin-top: 2px;font-size: 9pt;">' +function(){
                                        if(v.attachName.split('.')[1] != 'exe' && v.attachName.split('.')[1] != 'rar' && v.attachName.split('.')[1] != 'zip'){
                                            style = 'margin-left: 10px;';
                                            return '<h1 class="previewBtn item_wordH2" style="margin-left: 0;" attUrl="'+encodeURI(v.attUrl)+'"><fmt:message code="global.lang.view" /></h1>';
                                        }else{
                                            return '';
                                        }
                                    }()+ '<h1 class="downloadBtn item_wordH2" attUrl="'+encodeURI(v.attUrl)+'" style="'+ style + downloaddisplay +'"><fmt:message code="file.th.download" /></h1>' +
                                    str2+
                                    '<h1 class="deletefileBtn item_wordH2" attUrl="'+encodeURI(v.attUrl)+'" style="'+ deletedisplay +'"><fmt:message code="global.lang.delete" /></h1>'+
                                    '</div></li>';
                            });
                            if($('#img_none')!=null||$('#img_none')!=undefined){
                                $('#img_none').hide();
                            }
                            layer.closeAll();
                            $.layerMsg({content:'上传成功！',icon:1},function(){
                            });
                            $('#oneUploadFile').show();
                            $('#oneUploadFile').append(str)
                        }else {
                            layer.closeAll();
                            $.layerMsg({content:'上传失败！',icon:2},function(){
                            });
                        }
                    }
                });
            });
            /**********************************************/
            $('#oneUploadFile').delegate('.downloadBtn','click',function () {
                var _this = $(this);
                var url = _this.attr("atturl")
                window.location="../../download?"+url;
            });

            $('#oneUploadFile').on('click','.deletefileBtn',function () {
                var _this = $(this);
                var url =  'deletework?runId='+runId+'&'+_this.attr("atturl");
                $.layerConfirm({title:'<fmt:message code="menuSSetting.th.suredeleteMenu" />',content:'<fmt:message code="workflow.th.que" />？',icon:0},function(){
                    $.get(url,function(data,status){
                        if(data.flag){
                            $.layerMsg({content:'<fmt:message code="workflow.th.delsucess" />！',icon:1},function(){
                            });
                            _this.parent().parent().remove();
                            if($('#oneUploadFile li').length == 0){
                                $('#oneUploadFile').hide();
                                $('#img_none').show();
                            }
                        }else{
                            $.layerMsg({content:'<fmt:message code="lang.th.deleSucess" />！',icon:2},function(){

                            });
                        }
                    });
                },function(){

                });
            });
            $('#oneUploadFile').on('click','.previewBtn',function () {
                var _this = $(this);
                var atturl = _this.attr("atturl");
                pdurl($.UrlGetRequest('?'+atturl),atturl);
            });
            $('#oneUploadFile').on('click','.editBtn',function () {
                var _this = $(this);
                var atturl = _this.attr("atturl");
                $.popWindow("../../common/webOffice?documentEditPriv=1&ntType=1&emailList=1&print=1&"+atturl,'<fmt:message code="main.th.PreviewPage" />','0','0','1500px','800px');
            });
            //附件区点击显示
            $('.fujian').on('click',function(){
                if($(this).hasClass('check')){
                    $('.position').click();
                }else{
                    $('.fujian').find('a').css('color','#fff');
                    $(this).siblings().removeClass("check");
                    $(this).addClass('check');
                    $('#tab_c').css('right','0px')
                    $('.tab_one').show();
                }
            })
            /**********************************************/

            //附件收回按钮点击
            $('.position').on('click',function () {
                $('#tab_c').css('right',-($('#tab_c').width()+30))
                $('.check a').css('color','#4889f0');
                $('.check').removeClass('check');
            })
            /**********************************************/

            //保存按钮点击
            $('#saveform').click(function(){
                saveFlowData(function(data){
                    if(data.flag){
                        $.layerMsg({content:'<fmt:message code="diary.th.modify" />！',icon:1},function(){
                            // window.close();
                        });
                    }else{
                        $.layerMsg({content:'<fmt:message code="meet.th.SaveFailed" />！',icon:2},function(){

                        });
                    }
                });
            });
            /**********************************************/    
            
            // 修改意见
            $(document).on('click', '.sign_content', function(){
                var _this = this
                var $parent = $(_this).parent();
                var val = $(_this).text();
                // 判断是否是最后一个意见
                if ($parent.next().length == 0) {
                    return false
                }
                var signLayerIndex = layer.open({
                    title: '修改会签意见',
                    btn: ['确定','取消'],
                    area: ['400px', '300px'],
                    content: '<textarea class="new_sign_text" style="width: 100%; height: 100%; box-sizing: border-box;"></textarea>',
                    success: function(){
                        $('.new_sign_text').val(val);
                    },
                    yes: function(){
                        var $prev = $parent.parent();
                        var templ = $prev.attr('templ');
                        var $ele = $('<div>'+templ+'</div>');
                        $ele.find('.eiderarea').eq($parent.index()).find('.sign_content').text($('.new_sign_text').val());
                        $(_this).text($('.new_sign_text').val());
                        $prev.attr('templ', $ele.html());
                        layer.close(signLayerIndex);
                    }
                })
            });
            // 删除意见
            $(document).off('click', '.remove_sign');
            $(document).on('click', '.remove_sign', function () {
                var $this = $(this);
                if ($this.parent().next().length == 0) {
                    return false
                }
                var $pre = $this.parent().parent();
                var $templ = $('<div>' + $pre.attr('templ') + '</div>');
                var $tv = $('<div>' + $pre.attr('tv') + '</div>');
                var index = $this.parent().index();
                $templ.find('.eiderarea').eq(index).remove();
                $pre.attr('templ', $templ.html());
                $tv.find('.eiderarea').eq(index).remove();
                $pre.attr('tv', $tv.html());
                $this.parents('.eiderarea').remove();
            });
        });
    </script>
    <script type="text/javascript">
        var TANGER_OCX_OBJ;
        function init()
        {
            TANGER_OCX_OBJ=document.getElementById("TANGER_OCX");
            TANGER_OCX_OBJ.activate(true);
            if(window.navigator.platform=="Win64"){
                TANGER_OCX_OBJ.AddDocTypePlugin(".pdf","PDF.NtkoDocument","4.0.0.2","../../lib/officecontrol/ntkooledocallx64.cab",51,true);
            }else{
                TANGER_OCX_OBJ.AddDocTypePlugin(".tif","tif.NtkoDocument","4.0.0.2","../../lib/officecontrol/ntkooledocall.cab",51,true);
                TANGER_OCX_OBJ.AddDocTypePlugin(".pdf","PDF.NtkoDocument","4.0.0.2","../../lib/officecontrol/ntkooledocall.cab",51,true);
            }
            TANGER_OCX_OBJ.CreateNew("word.document");
        }
        /*
         *  func 从本地附件套红功能filename='C:\Users\gsb\Desktop\test.dot'
         *  string filename 必选  本地模板的路径
         *  bool [PromptSelect] 是否允许用户选择
         *  bool [IsConfirmConversions] 当模板文件不是WORD类型时，是否提示转换，默认true
         * */
        function red_chromatography_local(){//套红
            //AddTemplateFromLocal(filename, [PromptSelect], [IsConfirmConversions]);
            var filename = 'test.dot';
            TANGER_OCX_OBJ.AddTemplateFromLocal(filename);//此处不能为空，必须带一个参数
        }
        /*
         *  func 从url套红功能
         *  string URL 必选  远程模板文件URL
         *  bool [IsConfirmConversions] 当模板文件不是WORD类型时，是否提示转换，默认true
         * */
        function red_chromatography_url(){//套红可用，加载服务器资源下的，路径如下
            //TANGER_OCX_OBJ.AddTemplateFromURL(URL,[IsConfirmConversions]);
            var URL='/file/pjc/test.dot';
            TANGER_OCX_OBJ.AddTemplateFromURL(URL);
        }
        /*
         * 进入或者退出保留痕迹
         * bool vbool 是否保留痕迹
         * */
        /*function TrackRevisions(vbool){
         //var vbool = $('#TrackRevisions option:selected').val();
         TANGER_OCX_OBJ.TrackRevisions(vbool);
         }*/
        /*
         * 强制进入或者退出保留痕迹
         * bool vbool 是否保留痕迹
         * */
        function EnterRevisionMode(id){
            // var vbool = $('#TrackRevisions option:selected').val();
            var domID = document.getElementById(id);
            var vbool = domID.value;
            TANGER_OCX_OBJ.EnterRevisionMode(vbool);
        }
        /*
         * 该函数使用HTTP协议将文件保存到URL
         * string URL 处理后台保存的URL地址
         * String FileFieldName 控件文件域名称
         * string FileName 文件名
         * bool IsShowUI 是否显示进度条
         * return 提交URL之后从服务器返回的数据
         * */
        function SaveToURL(){
            //TANGER_OCX_OBJ.SaveToURL("/upload","DocFile","","NewDoc.doc",1);
            TANGER_OCX_OBJ.SaveToURL("../../upload?module=email","file","","/file/pjc/test.dot","upload_file");
        }
        /*
         * string SaveAsDocument 保存到本地的文档路径 可选
         * bool OverwriteExisting 是否覆盖现文件 可选
         * bool isPrompt 是否提示用户选择 可选
         * */
        function SaveToLocal(){//可用
            //TANGER_OCX_OBJ.SaveToLocal([SaveAsDocument], [OverwriteExisting], [isPrompt]);
            var SaveAsDocument = 'D:/test1.doc';
            TANGER_OCX_OBJ.SaveToLocal(SaveAsDocument);
        }
        //打印功能
        function doc_print(){
            //alert("a")；
            TANGER_OCX_OBJ.PrintPreview();
            TANGER_OCX_OBJ.PrintOut();

        }
    </script>

</div>
</body>
</html>